<%@ include file="/en/jsp/static.jsp" %>
<%@ page import="linuxbox.bookmark.logic.*" %>
<%@ page import="linuxbox.bookmark.bean.*" %>
<%@ taglib uri="/linuxbox/common.tld" prefix="common" %>

<table width="100%" border=1 cellpadding=2 cellspacing=0 bgColor=#dddddd>
  <tr>
    <td bgcolor="#dddddd" height="20">
      <table width="100%" border=0 cellpadding=2 cellspacing=0 bgColor=#dddddd>
        <tr>
          <td nowrap>
            <p align="center"><b><font color=#d05000>Bookmarks</font></b></p>
          </td>
          <td nowrap align=right>
            <a href="<%=BoxStatic.jspDir%>bookmark/Bookmark.jsp">More ...</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
<%
  BookmarkHome home = BookmarkHome.getInstance();
  String entries[] = sec.getConfigStrings("bookmark", "HomePage", "Entries", false);

  Collection col = home.getBookmarks(entries);

  if ( !col.isEmpty() )
  {
    Iterator it = col.iterator();
    int count=0;
%>
  <tr>
    <td>
      <TABLE cellSpacing=1 cellPadding=0 width="100%" border=0 bgColor=#dddddd>
<%
    while (it.hasNext())
    {
      BookmarkEntry entry = (BookmarkEntry)it.next();
%>
      <tr <% if ((count++ % 2) == 0) out.print("bgcolor=#f0f0f0"); %>>
        <td nowrap>
          <a href="<%=entry.getUrl()%>" target="_blank">
              <%=entry.getName()%></a>
        </td>
      </tr>
<%
    }
%>
      </table>
    </td>
  </tr>
<%
  }
  else
  {
    out.print("<tr><td>No Bookmarks defined, check <a href=\""+BoxStatic.servletDir+"/BookmarkSettingsAction?SubmitEdit=edit\">Settings.</a></td></tr>");
  }
%>
</table>

